-- GENERATED SPELL FOR [Dragonflayer Guardian] --


function spell0_27927(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48281,pUnit)
pUnit:RegisterEvent('Sorts_27927', 3304, 1)
end

function spell1_27927(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48280,pUnit)
pUnit:RegisterEvent('Sorts_27927', 2000, 1)
end

function Sorts_27927(pUnit, Event)
local choix_sorts_27927 = math.random(0, 1)
if choix_sorts_27927 == 0 then
pUnit:RegisterEvent('spell0_27927', 1, 1)
end
if choix_sorts_27927 == 1 then
pUnit:RegisterEvent('spell1_27927', 1, 1)
end
end

function mob27927_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27927', math.random(1500, 3000), 1)
end

function mob27927_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27927_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27927_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27927, 1, 'mob27927_Action')
RegisterUnitEvent(27927, 2, 'mob27927_Leave')
RegisterUnitEvent(27927, 3, 'mob27927_Kill')
RegisterUnitEvent(27927, 4, 'mob27927_Die')
